Skip to content

ci: GitHub→GitLab mirror + GitLab publish pipeline#19

Draft
beengud wants to merge 1 commit into
mainfrom
ci/gitlab-mirror
Draft

ci: GitHub→GitLab mirror + GitLab publish pipeline#19
beengud wants to merge 1 commit into
mainfrom
ci/gitlab-mirror

Conversation

@beengud

@beengud beengud commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Ports the GitHub→GitLab mirror + GitLab publish pipeline from the deprecated Go fork (beengud/observe PRs #10/#12) to this TypeScript fork, adapted for bun. Implements the cutover plan: mirror beengud/cli into NHL GitLab, then have the mop projects consume the mirrored repo.

Closes #10

What's here

  • .github/workflows/sync-to-gitlab.yml — on every push to main (and manual dispatch), bare-mirror-clone push to the NHL GitLab repo (bare clone avoids GitLab's "deny updating a hidden ref"). Same approach as the old fork.
  • .gitlab-ci.yml — runs on the GitLab mirror: testbuild (linux/x64 binary dist-bin/observe-linux-x64) → publish to the mop-config generic package registry → open an MR bumping OBSERVE_CLI_VERSION. Adapted from Go (go build) to bun (bun run build --target linux-x64).

Required setup before enabling

GitHub (this repo → Settings → Secrets and variables → Actions):

  • Secret GITLAB_SYNC_TOKEN — GitLab project access token, write_repository scope, on the mirror repo.
  • Variable GITLAB_MIRROR_URL — host/path without scheme/.git, e.g. gitlab.com/nhl/mop/cli (confirm the exact path when you create the GitLab repo — placeholder assumed).

GitLab (mirror repo → Settings → CI/CD → Variables):

  • MOP_CONFIG_PAT (api scope on nhl/mop), OBSERVE_OPENAPI_SPEC, OBSERVE_GQL_SPEC, OBSERVE_GQL_TOKEN.
  • Confirm MOP_CONFIG_PROJECT_ID (currently the old 82631227).

⚠️ Known gate

bun run codegen (run by both test and build) fetches the schema via GraphQL introspection, which is disabled on standard customer tenants — so the GitLab test/build stages will fail until OBSERVE_GQL_SPEC points at an introspection-enabled endpoint (or codegen is repointed at a committed SDL). Same blocker as observeinc#10. The mirror workflow has no such dependency and works as soon as the secret/variable are set.

Draft until the GitLab repo + secrets exist and the codegen gate is resolved.

Adapts the old Go fork's sync-to-gitlab action and .gitlab-ci.yml to bun:
mirror beengud/cli to NHL GitLab on main, then build (bun run build
--target linux-x64) + publish to mop-config registry + open a version-bump MR.
Build/test stages are gated on codegen (GraphQL introspection); see observeinc#10.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Re-establish GitLab publish pipeline + GitHub→GitLab mirror sync

2 participants